<template>
	<view>
		<view class="bg" v-if="list.length>0"></view>
		<view class="w_list" v-if="list.length>0">
			<view class="item" v-for="(item,index) in list" :key="index">
				<view class="left">
					<view class="tit">提现人：{{item.realname}}</view>
					<view class="time">{{item.createtime}}</view>
				</view>
				<view class="right">
					<view class="num">{{item.money_send}}</view>
					<view class="status" :class="{'status0':item.status==0,'status1':item.status==1,'status2':item.status==-1}">{{item.statusstr}}</view>
				</view>
			</view>
		</view>
		<view class="empty_loading">
			<image v-if="isloading" src="/static/business/loading.gif"></image>
			<view v-if="isempty">到底了~</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				uid: 0,
				page: 0,
				list: [],
				isloading: false,
				isempty: false,
			};
		},
		onReachBottom() {
			this.getlist();
		},
		onLoad(option) {
			this.uid = option.uid;
			this.getlist();
		},
		methods:{
			getlist() {
				this.page += 1;
				this.isloading = true;
				this.$axios('groupPay/list', 'POST', 'supplier', {
					page: this.page,
					uid: this.uid
				}).then(res => {
					this.isloading = false;
					if (res.data.code == 200) {
						var length = res.data.data.list.length;
						this.list = this.list.concat(res.data.data.list);
						this.isempty = length <= 0 ? true : false;
					}
				})
			}
		}
	}
</script>

<style lang="scss">
page{
	background: #FBF8FE;
	padding-bottom: 40rpx;
}
.bg{
	width: 100%;
	height: 400rpx;
	background: linear-gradient( 180deg, #4B05A7 0%, #A34DE8 52%, #FBF8FE 100%);
}
.w_list{
	background: #fff;
	border-radius: 12rpx;
	width: 94%;
	margin: 0 auto;
	margin-top: -380rpx;
	.item{
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 30rpx 0;
		border-bottom: 1rpx solid #DEDEDE;
		margin: 0 40rpx;
		font-size: 28rpx;
		.tit{
			color: #333333;
			margin-bottom: 8rpx;
		}
		.time{
			font-size: 24rpx;
			color: #999999;
		}
		.num{
			text-align: right;
			color: #8615E1;
			margin-bottom: 8rpx;
			font-weight: 600;
		}
		.status{
			border-radius: 4rpx;
			height: 34rpx;
			line-height: 34rpx;
			text-align: center;
			padding: 0 20rpx;
			font-size: 20rpx;
			background: #E5EFFE;
			color: #2E77FE;
		}
		.status0{
			background: #E5EFFE;
			color: #2E77FE;
		}
		.status1{
			background: #E8F6EC;
			color: #0EAE0E;
		}
		.status2{
			background: #F6E8E8;
			color: #AE0E0E;
		}
	}
	.item:last-child{
		border-bottom: none;
	}
}
</style>
